﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Farigola.Engine.Reposit;

namespace Farigola.Engine.PersistXml
{
    public class EngineRepositXml : IEngineReposit
    {
        /// <summary>
        /// Manager of tasks activity in the application (trace)
        /// Manage alos errors occurs in the engine.
        /// </summary>
        private AppActivityMgr _appActivityMgr;


        private IProjectReposit _projectReposit;

        /// <summary>
        /// Constructor.
        /// </summary>
        public EngineRepositXml()
        {
            _projectReposit = new ProjectRepositXml();
        }

        public void SetAppActivityMgr(AppActivityMgr appActivityMgr)
        {
            _appActivityMgr = appActivityMgr;

            _projectReposit.SetAppActivityMgr(_appActivityMgr);
        }

        /// <summary>
        /// return the concrete xml project repository, to load/save project
        /// through the interface.
        /// </summary>
        /// <returns></returns>
        public IProjectReposit GetProjectReposit()
        {
            return _projectReposit;
        }
    }
}
